<template>
  <div>
    <template v-if="ticketMode">
      <OrderDishBillCard v-if="ticketMode.id == '01'" />
      <RemoveFoodCard v-if="ticketMode.id == '02'" />
      <FoodReturnCard v-if="ticketMode.id == '03'" />
      <UrgeCookingCard v-if="ticketMode.id == '04'" />
      <WaitCookingCard v-if="ticketMode.id == '06'" />
      <StartCookingCard v-if="ticketMode.id == '07'" />
      <TransformNoticeCard v-if="ticketMode.id == '08' || ticketMode.id == '09'" />
      <FoodCountCard v-if="ticketMode.id == '10'" />
      <PreconsolidationBillCard v-if="ticketMode.id == '11'" />
      <StatementCard v-if="ticketMode.id == '12' || ticketMode.id == '16'" />
      <DepartmentalBusinessStatementCard v-if="ticketMode.id == '13'" />
      <DailySalesCard v-if="ticketMode.id == '14'" />
      <BookBillCard v-if="ticketMode.id == '18'" />
      <OnAccountDetailCard v-if="ticketMode.id == '17' || ticketMode.id == '20'" />
      <RechargeBillCard v-if="ticketMode.id == '19'" />
      <ShiftHandoverBillCard v-if="ticketMode.id == '15'" />
    </template>
  </div>
</template>

<script  setup>
import { ref } from 'vue'
// 引用新迁移的Vue3组件
import OrderDishBillCard from './OrderDishBillCard.vue'
import DailySalesCard from './DailySalesCard.vue'
import DepartmentalBusinessStatementCard from './DepartmentalBusinessStatementCard.vue'
import FoodCountCard from './FoodCountCard.vue'
import FoodReturnCard from './FoodReturnCard.vue'
import PreconsolidationBillCard from './PreconsolidationBillCard.vue'
import RemoveFoodCard from './RemoveFoodCard.vue'
import StartCookingCard from './StartCookingCard.vue'
import StatementCard from './StatementCard.vue'
import TransformNoticeCard from './TransformNoticeCard.vue'
import UrgeCookingCard from './UrgeCookingCard.vue'
import WaitCookingCard from './WaitCookingCard.vue'
import BookBillCard from './BookBillCard.vue'
import OnAccountDetailCard from './OnAccountDetailCard.vue'
import RechargeBillCard from './RechargeBillCard.vue'
import ShiftHandoverBillCard from './ShiftHandoverBillCard.vue'
// import { useStore } from 'vuex'
// import { computed } from 'vue'

// const store = useStore()
// const ticketMode = computed(() => store.getters.ticketMode)


const ticketMode = ref() // 单据模式数据

// 打开/关闭 单据设置 卡片
const openCard = (row) => {
  ticketMode.value = row
}

// 暴露给父组件的方法
defineExpose({
  openCard
})
</script>

<style></style>
